{% extends "base.html" %}  
{% block title %} 患者列表 {% endblock %}  

{% block content %} 

  <div class="container">

    <!-- Docs nav
    ================================================== -->
    <div class="row">
      <div class="span3 bs-docs-sidebar">
        <ul class="nav nav-list bs-docs-sidenav">    
        <li><a href="{% url sle.views.list_patient %}"><i class="icon-chevron-right"></i> 返回列表</a></li>     
          <li><a href="#comprehensive"><i class="icon-chevron-right"></i>综合分析</a></li>                
        </ul>
      </div>
      
      

<div class="span9">
              
          <section id="comprehensive">
          <div class="page-header">
            <h2>综合分析</h2>
          </div>

        
<div class="bs-docs-example">

<div align="center">
 <div class="row-fluid show-grid">
   <div class="span12">请选择随访日期范围：
  <input name="bdate" id="bdate" type="text" class="input-small" placeholder="开始日期" onFocus="HS_setDate(this)"  style="margin-top:8px; margin-left:6px;"/>
&nbsp;&nbsp;----&nbsp;&nbsp;
  <input name="edate" id="edate" type="text" class="input-small" placeholder="结束日期" onFocus="HS_setDate(this)" style="margin-top:8px;"/>
  </div>
 </div>
  <div class="row-fluid show-grid">
  <div class="span4">
  请选择指标：<select name="index" id="index" class="span5" style="margin-top:8px; margin-left:6px; margin-right:10px;">
                <option  value="ssddi">SSDDI</option>
                <option  value="ssdi">SSDI</option>
                <option  value="essdai">ESSDAI</option>
                <option  value="esspri">ESSPRI</option>
                <option  value="pcs">SF12-PCS</option>
                <option  value="mcs">SF12-MCS</option>
              </select>
              
              </div>
   <div class="span4">
  请选择性别：<select name="sex" id="sex" class="span4" style="margin-top:8px; margin-left:6px;">
                <option value="2">不限</option>
                <option value="1">男性</option>
                <option value="0">女性</option>
              </select>
             
              </div>
<div class="span4">
  请选择年龄段：<select name="age" id="age" class="span4" style="margin-top:8px; margin-left:6px; margin-right:10px;">
                <option  value="1-16">1-16</option>
                <option  value="17-25">17-25</option>
                <option  value="26-30">26-30</option>
                <option  value="31-35">31-35</option>
                <option  value="36-40">36-40</option>
                <option  value="41-45">41-45</option>
                <option  value="46-50">46-50</option>
                <option  value="51-55">51-55</option>
                <option  value="56-60">56-60</option>
                <option  value="61-65">61-65</option>
                <option  value="66-70">66-70</option>
                <option  value="70-110">大于70</option>
              </select>
               <input type="button" id="submit" value="查看" name="B2" class="btn btn-info" /> 
              </div>
  </div>
 </div>
  <div id="comprehensive_chart" style="margin-top:3px; margin-left:20px; width:720px; height:560px;"></div>           
</div>

</section>  



</div>

</div>
</div>


{% endblock %} 

{% block some_js %}



<script class="code" type="text/javascript">


  
  
        //mcs开始
  $('#submit').click(function(){

  if( Date.parse($('#bdate').val()) <= Date.parse($('#edate').val()) ){

  $.get("{% url sle.views.comprehensive_chart %}",{
  
  bdate:$('#bdate').val(),
  edate:$('#edate').val(),
  index:$('#index').val(),
  sex:$('#sex').val(),
  age:$('#age').val(),
  
  } , function (data){
  

   $('#comprehensive_chart').empty();
  var plot1 = $.jqplot('comprehensive_chart', data, {
  
  
  
  
	  title: {
        text: '综合图表分析',  //设置当前图的标题
        show: true,//设置当前图的标题是否显示
		fontSize:18,
    },
      axes:{
        xaxis:{
          renderer:$.jqplot.DateAxisRenderer,
          tickRenderer: $.jqplot.CanvasAxisTickRenderer,
                numberTicks: 7,
				fontFamily:'Tahoma',
                tickOptions: {
                    angle: -30,
					formatString: '%Y-%m-%d', 
					tickInterval:'2 weeks',
                }
        },
        yaxis:{
		tickRenderer: $.jqplot.CanvasAxisTickRenderer,
          tickOptions:{
		    angle: -10,
            formatString:'%.1f——'
            }
        }
      },
	  
      highlighter: {
        show: true,
        sizeAdjust: 7.5,

      },
      cursor: {
        show: false
      }
  });
  
  


//  alert(data);
  

  },'json');

  }else{

  alert("起始日期 不能 晚于 结束日期!");  

  }
  
  });//mcs_submit 结束
  
  
  

</script>



{% endblock %}